package com.qf.feign;

import com.qf.entity.R;
import com.qf.entity.Room;
import com.qf.entity.RoomPrice;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient("MICRO-CUSTOM")
public interface RoomFeign {
    @RequestMapping("/room/list/{hid}")
    R<List<Room>> List(@PathVariable Integer hid);
    @RequestMapping("/room/add")
    R<Boolean> insert(@RequestBody Room room);
    @RequestMapping("/room/getPirce")
    R<List<RoomPrice>> getRoomPrice(@RequestParam Integer rid);
    @RequestMapping("/room/updateprice")
    R<Boolean> updatePrice(@RequestBody RoomPrice roomPrice);
    @RequestMapping("/room/getHotalId/{rid}")
    R<Integer> getHotalIdByRoomId(@PathVariable Integer rid);
    @RequestMapping("/room/getRoom/{rid}")
    R<Room> getRoomById(@PathVariable Integer rid);

}
